<template>
    <div class="box-title">
        <span class="item_title">
            <router-link v-if="props.link" :to="props.link" >{{props.title}}</router-link>
            <span v-else>{{props.title}}</span>
        </span>
        <div class="right_btn_box">
            <slot/>
        </div>
    </div>
</template>

<script setup>
    const props=defineProps({
        title: {
            type: String,
            default: () => ''
        },
        link:{
            type: String,
            default: () => ''
        }
    })

</script>

<style scoped lang="less">
    .box-title {
        display: flex;
        justify-content: space-between;
        padding-right: .2rem;
        background: url("./images/box_title.png") left center no-repeat;
        background-size: auto 100%;
        height: .25rem;
        line-height: .25rem;
        position: relative;
        color: #0FFBFD;
        padding-left: .35rem;

        a , a:any-link {
            color: #0FFBFD;
        }


        .item_title {
            flex: 1;
        }
        .right_btn_box{
            color: #20D9E3;
            font-size: .12rem;
            cursor: pointer;
            a{
                color: #20D9E3;
            }
        }
    }

</style>